home *** CD-ROM | disk | FTP | other *** search
- Path: news.ua.es!usenet
- From: Gregorio Ortiz <a00813.@eps.ua.es>
- Newsgroups: comp.lang.c++
- Subject: Using multiple functions
- Date: Fri, 19 Jan 1996 08:36:51 +0100
- Organization: Universidad de Alicante
- Message-ID: <30FF4A13.5488F069@eps.ua.es>
- NNTP-Posting-Host: s04.eps.ua.es
- Mime-Version: 1.0
- Content-Type: multipart/mixed;
- boundary="---------------------------3700897086577320701235075530"
- X-Mailer: Mozilla 2.0b3 (X11; I; Linux 1.1.59 i486)
- CC: drackull@datasync.com
-
- This is a multi-part message in MIME format.
-
- -----------------------------3700897086577320701235075530
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
-
- Hello,
-
- -----------------------------3700897086577320701235075530
- Content-Type: message/rfc822
- Content-Transfer-Encoding: 7bit
- Content-Disposition: inline
-
- Path: news.ua.es!power.ci.uv.es!news.rediris.es!news.uoregon.edu!news.orst.edu!news.cs.indiana.edu!umn.edu!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.datasync.com!news
- From: drackull@datasync.com (Eddy B Drackull)
- Newsgroups: comp.lang.c++
- Subject: Re: Using multiple functions in one file
- Date: 13 Jan 1996 06:06:57 GMT
- Organization: RK Inspection Service Inc.
- Lines: 39
- Message-ID: <4d7i61$i3e@osh2.datasync.com>
- References: <DL00rI.HFr@cunews.carleton.ca>
- NNTP-Posting-Host: os-ppp25.datasync.com
- X-Newsreader: WinVN 0.92.6
-
- In article <DL00rI.HFr@cunews.carleton.ca>, abelo@chat.carleton.ca (Andrew Belo) says:
- >
- >
- >I have written an example program out of a book and it keeps giving me an
- >error that says "Call to undefined function 'butler' in function main()"
- >I am using Borland C++ for Dos, Win and Win 32 Version 4.5.
- >
- >The book is called C: Step by Step, and the program is as follows.
-
- try this
-
- /* two_func.c -- a program using two functions in one file */
- #include <stdio.h>
-
- void butler(void);/*declar a function befor using it*/
- /*you could switch the order of butler() and main and it will also work*/
- main()
- {
- printf("I will summon the butler function. \n");
- butler();
- printf("Yes. Bring me some tea and floppy disks.\n");
- }
- butler()
- {
- printf("You rang, sir? \n");
- }
-
- >----------------------------------------------------------------------------
- >Andrew Belo | WARNING: Yes this message has spelling mistakes but
- >1st Year Computer Sci | learn to live with it!!!!!!!!
- >Carleton University ------------------------------------------------------
- >Email address: abelo@chat.carleton.ca
- > ai806@FreeNet.Carleton.CA
- >Home Page: chat.carleton.ca/~abelo
- >----------------------------------------------------------------------
- >
-
-
- bye drackull
-
- -----------------------------3700897086577320701235075530--
-
-